#include <bits/stdc++.h>
using namespace std;
int n,a,b,c,d;
int main(void){
    while(~scanf("%d",&n) && n){
        scanf("%d%d%d%d",&a,&b,&c,&d);
        if(abs(a)>n || abs(b)>n || abs(c)>n || abs(d)>n){
            printf("Out Of Range\n");
            continue;
        }
        int dx=abs(a-c);
        int dy=abs(b-d);
        if(__gcd(max(dx,dy),min(dx,dy))==1){
            printf("Yes\n");
        }else{
            printf("No\n");
        }
    }
    return 0;
}